//
//  SASroreKit.h
//  01_kakin
//
//  Created by jon due on 12/04/12.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
#import "AppDelegate.h"
#import "Reachability.h"

@protocol SASroreKitDelegate<NSObject>
@optional

-(void)didFaildNetwork:(NSString*)errstr;
-(void)didFaildDevice:(NSString*)errstr;

@end


@interface SASroreKit : NSObject <SKProductsRequestDelegate,SKPaymentTransactionObserver,UIAlertViewDelegate>{
    
    // 未完了トランザクションカウント（複数決済を防ぐため）
    int UnfinishedCount;
}
@property(nonatomic,assign)id <SASroreKitDelegate> delegate;
@property(nonatomic,retain)AppDelegate *appDelegate;
@property(nonatomic,retain)SKProduct *products;
@property(nonatomic,retain)NSString *errString;


//
-(id)initStoreKit;
// プロダクトのリストを生成

-(void)startCheck;
-(void)productRequest;
-(void)purchase;
-(void)repurchase;

@end